package cn.org.donald.framework.annotation;


import cn.org.donald.framework.config.IntegerLimitValidate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;


/**
 * 限制int可以输入哪些数字
 * @author : Donald
 * @since : 2020/12/18 11:18
 */
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.TYPE,ElementType.METHOD})
@Documented
@Constraint(validatedBy = IntegerLimitValidate.class)
public @interface IntegerLimit {

    String message() default "{There is can not be validated by cn.org.donald.framework.annotation.IntegerLimit!}";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };
    int[] includes() default { };
}
